total = eval(input())
sum = int(10)
for i in range(3):
    print(total // sum, end=" ")
    total %= sum
    sum //= 2
print(total)
